import { useRef, useEffect, useMemo, useCallback, useState } from 'react';

let o1;
const Home = () => {
  const testMap = useRef(new Map([['aa', { a: null, b: null }]]));
  const [count, setCount] = useState(0);
  // const useA = useCallback(() => {
  //   const obj = testMap.current.get('aa')!;
  //   o1 = obj;
  //   console.log(obj, 'obj');
  //   const fnB = useCallback(() => {
  //     (obj.a = 123), (obj.b = '123');
  //     console.log(o1 === obj);
  //   }, []);
  //   return [fnB];
  // }, []);
  // const [fnB] = useA();
  console.log('aa');
  return (
    <div
      onClick={() => {
        // fnB();
        setCount(count + 1);
      }}
    >
      Home
    </div>
  );
};

export default Home;
